﻿#pragma once
#include "Base_Node.h"
class Num_Node :
	public Base_Node
{
private:
	double value;
public:
	Num_Node(double value) {
		this->type = Lexer::NUMBER;
		this->value = value;
	}
	double getValue() { return value; }

	std::string generatePrefix()const {
		std::string reStr;
		char ch[20];
		sprintf_s(ch, "%g", value);
		reStr += ch;
		return reStr;
	}
	std::string generateInfix()	const {
		std::string reStr;
		char ch[20];
		sprintf_s(ch, "%g", value);
		reStr += ch;
		return reStr;
	}
	std::string generatePostfix() const {
		std::string reStr;
		char ch[20];
		sprintf_s(ch, "%g", value);
		reStr += ch;
		return reStr;
	}

};
